<template>
  <div class="pwd">
    <!-- 头部导航栏 -->

    <van-nav-bar
      title="账号密码登录"
      left-text="返回"
      left-arrow
      type="danger"
      @click-left="onClickLeft"
    />

    <!-- 密码输入框 -->
    <van-form @submit="onSubmit">
      <van-field
        v-model="password"
        type="password"
        name="密码"
        style="margin-top: 1rem"
        placeholder="输入密码"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <div style="margin: 16px">
        <van-button
          round
          block
          type="danger"
          native-type="submit"
          style="margin-top: 5rem"
          >立即登录</van-button
        >
      </div>
    </van-form>

    <div class="yiyou">忘记密码</div>
  </div>
</template>

<script>
import { Toast } from "vant";

export default {
  data() {
    return {
      password: "",
      value: "",
      showKeyboard: true,

      phoneNumber: "",
      captcha: "",
    };
  },

  methods: {
    onClickLeft() {
      Toast.success("成功返回");

      this.$router.push({ name: "Reg" });
    },
    onSubmit(values) {
      console.log("submit", values);
    },
  },
};
</script>

<style scoped>
.yiyou {
  text-align: center;
  color: gray;
  font-size: 12px;
}
</style>
